<template>
  <div>
    <div class="headBack">
      <el-row class="container">
        <el-col :span="24">
          <!-- pc端导航 -->
          <PCHead class="pc-head" :activeIndex="activeIndex" :classList="classList" :projectList="projectList" :searchkey="searchkey" :haslogin="haslogin" @searchEnterFun="searchEnterFun" @searchChangeFun="searchChangeFun" @logoinFun="logoinFun" @userlogout="userlogout" />
          <!-- 移动端 -->
          <H5Head class="h5-head" :activeIndex="activeIndex" :classList="classList" :projectList="projectList" :searchkey="searchkey" :haslogin="haslogin" @searchEnterFun="searchEnterFun" @searchChangeFun="searchChangeFun" @logoinFun="logoinFun" @userlogout="userlogout" />
        </el-col>
      </el-row>
    </div>
    <div class="headImgBox">
      <div class="scene">
        <div><span id="like"></span></div>
      </div>
      <div class="h-information">
        <a href="#/Aboutme">
          <img src="@/assets/img/tou.png" alt="">
        </a>
        <h2 class="h-description">
          <a href="#/Aboutme">
            Write the Code. Change the World.
          </a>
        </h2>
      </div>
    </div>
  </div>
</template>

<script>
import H5Head from './components/h5-head.vue'
import PCHead from './components/pc-head.vue'
export default {
  name: 'Head',
  data () {
    return {
      activeIndex: '/',
      classList: [
        {
          id: 1,
          cate_name: '999'
        },
        {
          id: 2,
          cate_name: '999'
        },
        {
          id: 3,
          cate_name: '999'
        }
      ],
      projectList: [
        {
          nav_url: 'dddd',
          nav_name: 'ddddd'
        },
        {
          nav_url: 'dddd',
          nav_name: 'ddddd'
        },
        {
          nav_url: 'dddd',
          nav_name: 'ddddd'
        }
      ],
      searchkey: '',
      haslogin: false,
      pMenu: true //手机端菜单打开
    }
  },
  components: {
    H5Head,
    PCHead
  },
  methods: {
    searchEnterFun () { },
    searchChangeFun () { },
    logoinFun () { },
    userlogout () { }
  },
  created () { }
}
</script>


<style scoped lang="less">
/*********头部导航栏********/
/*头部导航栏盒子*/

.headBack {
  width: 100%;
  background: rgba(40, 42, 44, 0.6);
  /*margin-bottom:30px;*/
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  z-index: 100;
}

/*头部背景图*/

.headImgBox {
  height: 650px;
  position: relative;
  width: 100%;
  background-size: cover;
  background-position: center 50%;
  background-repeat: no-repeat;
  margin-bottom: 90px;
  background-image: url('./../../assets/img/headbg05.jpg');
}

.h-information {
  text-align: center;
  width: 70%;
  margin: auto;
  position: relative;
  top: 480px;
  padding: 40px 0;
  font-size: 16px;
  opacity: 0.98;
  background: rgba(230, 244, 249, 0.8);
  border-radius: 5px;
  z-index: 1;
  animation: b 1s ease-out;
  -webkit-animation: b 1s ease-out;
}

@-webkit-keyframes b {
  0% {
    -webkit-transform: translateY(90px);
    transform: translateY(90px);
  }
  80% {
    -webkit-transform: translateY(5px);
    transform: translateY(5px);
  }
  90% {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
  }
  to {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes b {
  0% {
    -webkit-transform: translateY(90px);
    transform: translateY(90px);
  }
  80% {
    -webkit-transform: translateY(5px);
    transform: translateY(5px);
  }
  90% {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
  }
  to {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

.h-information img {
  width: 100px;
  height: 100px;
  border-radius: 100%;
  transition: all 0.4s ease-in-out;
  -webkit-transition: all 0.4s ease-in-out;
  object-fit: cover;
}

.h-information img:hover {
  transform: rotate(360deg);
  -webkit-transform: rotate(360deg);
}

.h-information h2 {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  /*font-family: 'Sigmar One';*/
}
.h-information h2 a {
  background: linear-gradient(to right, #df2050, #48456d);
  -webkit-background-clip: text;
  color: transparent;
}
.headImgBox .scene {
  width: 100%;
  /*height:300px;*/
  text-align: center;
  font-size: 100px;
  font-weight: 200;
  color: #fff;
  position: absolute;
  left: 0;
  top: 160px;
  font-family: 'Sigmar One', Arial;
  text-shadow: 0 2px 2px #47456d;
}

.headImgBox .scene span {
  transform: matrix(1, 0, 0, 1, 0, 0);
  -webkit-transform: matrix(1, 0, 0, 1, 0, 0);
  text-shadow: 1px 1px 0 #ff3f1a, -1px -1px 0 #00a7e0;
}

.saying:after {
  content: '|';
  font-family: Arial, sans-serif;
  font-size: 1em;
  /*line-height: 0;*/
  display: inline-block;
  vertical-align: baseline;
  opacity: 1;
  text-shadow: 1px 1px 0 #ff3f1a, -1px -1px 0 #00a7e0;
  animation: caret 500ms infinite;
}

@keyframes caret {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
</style>

